package com.ruoyi.project.meal.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 职工报餐对象
 * 
 * @author Sky
 * @date 2024-03-13
 */
@Data
public class MealWorkerVo  implements Serializable
{
    private static final long serialVersionUID = 1L;


    /** 上报时间 */
    @Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd")
    @DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty("日期")
    private Date reportDate;

    /** 早餐 */
    @Excel(name = "早餐")
    @ExcelProperty("早餐")
    private int breakfast;

    /** 午餐 */
    @Excel(name = "午餐")
    @ExcelProperty("午餐")
    private int lunch;

    /** 晚餐 */
    @Excel(name = "晚餐")
    @ExcelProperty("晚餐")
    private int dinner;

    @ExcelProperty("晚餐")
    private String campus;

    /** 上报时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上报时间")
    private String reportDateStr;


    public String getReportDateStr() {
        if(reportDate!=null){
            reportDateStr= DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,reportDate);
        }
        return reportDateStr;
    }


}
